<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>主页</title>
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">
    <!-- No Baidu Siteapp-->
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!-- Add to homescreen for Chrome on Android -->
    <meta name="mobile-web-app-capable" content="yes">
    <!-- Add to homescreen for Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <!-- Tile icon for Win8 (144x144 + tile color) -->
    <meta name="msapplication-TileColor" content="#0e90d2">

    <link rel="stylesheet" href="assets/css/amazeui.min.css">
    <link rel="stylesheet" href="assets/css/app.css">
    <link rel="stylesheet" href="assets/css/index.css">
    <link rel="stylesheet" href="assets/css/public.css">
    <link rel="stylesheet" href="layer/mobile/need/layer.css">

</head>
<style>
    .center{
        height:194px;
        margin-top:71px;
    }
</style>
<body>
<div class="top am-g">
    <div class=" am-u-sm-12 am-text-center" style="position: relative;">
        <span class="center-title">首页</span>
        <img src="assets/i/me.png" alt="" class="tomine" style="position: absolute;top:10px;right:15px;height:25px;">
    </div>
</div>
<div class="am-g center">
    <div class="am-u-sm-12 am-padding-0 img">
    </div>
</div>
<div class="am-g all">
    <div class="am-u-sm-12 am-padding-0 list">
        <a onclick="bangding()">
        <div class="am-u-sm-6 am-padding-0">
            <img src="images/xinxi.png" class="left" >
        </div>
    </a>
    <a href="jiaofei.html">
        <div class="am-u-sm-6 am-padding-0">
            <img src="images/jiaofei.png" class="right" >
        </div>
    </a>
    </div>
    <div style="clear:both;"></div>
    <div class="am-u-sm-12 am-padding-0 list">
        <a href="baoxiu.html">
        <div class="am-u-sm-6 am-padding-0">
            <img src="images/baoxiu.png" class="left" >
        </div>
    </a>
    <a href="record.html">
        <div class="am-u-sm-6 am-padding-0">
            <img src="images/jilu.png" class="right" >
        </div>
    </a>
    </div>
</div>

</body>
<script src="assets/js/jquery.min.js"></script>
<script src="layer/layer.js"></script>
<script src="assets/js/amazeui.min.js"></script>
<script  src="assets/js/global.js"></script>
<script>

    var token = '';  //token
    function bangding() {
        data={
            token:sessionStorage.access_token,
        };
        $.ajax({
            method:"get",
            data: data,
            url:"/index/user/ajax_is_bind",
            async:false ,
            success:function (result) {
                console.log(result);
                if (result.code ==1){
                    layer.msg(result.msg);
                }
                if (result.code ==3){
                    self.location="bangding-info.html";
                }
                if (result.code ==-1){
                    sessionStorage.clear();
                    initGlobalPage();
                    return;
                }
            }

        })
    }

    $(function () {
        initGlobalPage();
        $('.tomine').click(function(){
            window.location.href="mine.html";
        })
    })
</script>
</html>